unit DistrictFrm;

interface

uses
  dxRibbonForm,
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cmUtils, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, dxSkinsCore, dxSkinMcSkin, dxSkinOffice2010Black,
  dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinSeven,
  dxSkinsdxRibbonPainter, dxSkinscxPCPainter, dxLayoutControl, cxClasses,
  dxRibbon, cxPropertiesStore, cxStyles, cxCustomData, cxFilter, cxData,
  cxDataStorage, cxEdit, DB, cxDBData, cxGridLevel, cxGridCustomView,
  cxGridCustomTableView, cxGridTableView, cxGridDBTableView, cxGrid, DModule,
  FIBDataSet, pFIBDataSet;

type
  TDistrictForm = class(Tdxcustomribbonform)
    Ribbon1Tab1: TdxRibbonTab;
    Ribbon1: TdxRibbon;
    grp1: TdxLayoutGroup;
    lcntr1: TdxLayoutControl;
    prop1: TcxPropertiesStore;
    v1: TcxGridDBTableView;
    l1: TcxGridLevel;
    grd1: TcxGrid;
    Itm_grd1: TdxLayoutItem;
    ds_District: TpFIBDataSet;
    src_district: TDataSource;
    clCode: TcxGridDBColumn;
    clName: TcxGridDBColumn;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  DistrictForm: TDistrictForm;

implementation

{$R *.dfm}

procedure TDistrictForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
  RemoveBtn(Name);
 // UnregisterHotKey(Handle, 1);
  Action:=caFree;
end;

procedure TDistrictForm.FormCreate(Sender: TObject);
begin
  LoadForm(prop1,Self.Name);
  DSOptoins(ds_District,'','SPR$DISTRICT','CODE','GEN_SPR$DISTRICT_ID');
  AddButton(self);
 // RegisterHotKey(Handle, 1, 0, VK_F1); // F1
end;



end.
